import java.util.List;


public class TrampolineRoute {
	char from;
    char to;
    
    public static TrampolineTarget getTrampolineTarget(Grid g, List<TrampolineRoute> routes, Trampoline t)
    {
        for (TrampolineRoute tr : routes)
        {
            if (tr.from == t.getCharacter())
            {
                for (int x = 0; x < g.getWidth(); x++)
                {
                    for (int y = 0; y < g.getHeight(); y++)
                    {
                        if (g.getBlockObjects().get(x).get(y) instanceof TrampolineTarget)
                        {
                            return (TrampolineTarget)g.getBlockObjects().get(x).get(y);
                        }
                    }
                }
            }
        }
        return null;
    }
}
